import request from '@/utils/request'

// 获取单位数据
export function getUnitsList(data) {
  return request({
    url: '/vue-element-admin/unitsList/list',
    method: 'post',
    data
  });
}
export function getStaffList1(data) {
  return request({
    url: '/vue-element-admin/staffsList/list1',
    method: 'post',
    data
  });
}
// 获取员工数据
export function getStaffList(data) {
  return request({
    url: '/vue-element-admin/staffsList/list',
    method: 'post',
    data
  });
}
export function getStaffInfo(id) {
  return request({
    url: '/vue-element-admin/staffsList/staffInfo',
    method: 'get',
    params: { id }
  })
}
// 获取通告列表
export function getNoticeList(data) {
  return request({
    url: '/vue-element-admin/newUsertest/list',
    method: 'post',
    data
  });
}
export function fetchArticle(id) {
  return request({
    url: '/vue-element-admin/newUsertest/detail',
    method: 'get',
    params: { id }
  })
}

// 新增通告列表
export function addNoticeList(data) {
  return request({
    url: '/vue-element-admin/newUsertest/addlist',
    method: 'post',
    data
  });
}

// 删除通告列表
export function delNoticeList(data) {
  return request({
    url: '/vue-element-admin/newUsertest/dellist',
    method: 'post',
    data
  });
}
// 批量删除通告列表
export function AlldelNoticeList(data) {
  return request({
    url: '/vue-element-admin/newUsertest/Alldellist',
    method: 'post',
    data
  });
}

// 编辑通告列表
export function editNoticeList(data) {
  return request({
    url: '/vue-element-admin/newUsertest/editlist',
    method: 'post',
    data
  });
}
// 导出通告列表
export function ExportList(data) {
  return request({
    url: '/vue-element-admin/newUsertest/Export',
    method: 'post',
    data
  });
}

// 增加阅读数
export function addScanCount(data) {
  return request({
    url: '/vue-element-admin/newUsertest/ScanCount',
    method: 'post',
    data
  });
}
// 新增文章评价数据
export function addEvaluate(data) {
  return request({
    url: '/vue-element-admin/newUsertest/evaluate',
    method: 'post',
    data
  });
}
